<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8"/>
    <title>网站后台管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link rel="stylesheet" href="${e.res('/css/back_works.css')}">
    <link rel="stylesheet" href="${e.res('/css/bootstrap.min.css')}">
    <link rel="stylesheet" href="${e.res('/css/font-awesome.min.css')}">
    <link rel="stylesheet" href="${e.res('/css/ace.min.css')}">
    <link rel="stylesheet" type="text/css" href="${e.res('/fancybox/jquery.fancybox.css')}" media="screen" />
    <link rel="stylesheet" type="text/css" href="${e.res('/fancybox/helpers/jquery.fancybox-buttons.css')}" />
    <link rel="stylesheet" type="text/css" href="${e.res('/fancybox/helpers/jquery.fancybox-thumbs.css')}" />
    <script src="${e.res('/js/jquery-1.10.1.min.js')}"></script>
    <script src="${e.res('/js/masonry.pkgd.min.js')}"></script>
    <script src="${e.res('/js/backworks.js')}"></script>
    <script src="${e.res('/js/errorHander.js')}"></script>
    <script src="${e.res('/js/jquery.lazyload.js')}"></script>
    <script src="${e.res('/js/errorHander.js')}"></script>
    <script src="${e.res('/fancybox/jquery.fancybox.js')}" ></script>
    <script src="${e.res('/fancybox/helpers/jquery.fancybox-buttons.js')}"></script>
    <script src="${e.res('/fancybox/helpers/jquery.fancybox-thumbs.js')}"></script>
    <script src="${e.res('/fancybox/helpers/jquery.fancybox-media.js')}"></script>
</head>
<body>
<#include "/pages/moudle/BackHead.ftl">
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <#include "/pages/moudle/BackSideBar.ftl">
        <@backSideBar chooseTag = '1' />
        <!--页面主体内容-->
        <div class="main-content">
            <!-- 面包屑 -->
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="icon-home home-icon"></i>
                        <a href="#">首页</a>
                    </li>
                    <li>
                        <a href="#">作品管理</a>
                    </li>
                    <li class="active">作品列表</li>
                </ul>
            </div>
            <!-- 面包屑 -->
            <div class="page-content">
                <div class="page-header">
                    <h1>
                            作品列表
                        <small>
                            <i class="icon-double-angle-right"></i>
                            已上传的作品列表
                        </small>
                    </h1>
                </div>
                <!-- /.page-header -->
                <div class="row">
                    <div class="col-xs-12">
                        <form class="form-horizontal" role="form">
                            <div class="table-responsive">
                                <div id="sample-table-2_wrapper" class="dataTables_wrapper" role="grid">
                                    <!--<div class="row">
                                        <div class="col-sm-6">
                                            <div id="sample-table-2_length" class="dataTables_length"><label>Display
                                                <select
                                                        size="1" name="sample-table-2_length"
                                                        aria-controls="sample-table-2">
                                                    <option value="10" selected="selected">10</option>
                                                    <option value="15">15</option>
                                                    <option value="25">25</option>
                                                </select> records</label></div>
                                        </div>
                                    </div>-->
                                    <#include "/pages/moudle/Pagination.ftl">
                                    <@pagination id="works" method="/works/list" page=resMap.pageInfo>
                                    <table id="sample-table-2"
                                           class="table table-striped table-bordered table-hover dataTable"
                                           aria-describedby="sample-table-2_info">
                                        <thead>
                                        <tr role="row">
                                            <th class="center sorting_disabled" style="width: 164px;">名称</th>
                                            <th class="center sorting_disabled" style="width: 148px;">类型</th>
                                            <th class="center sorting_disabled" style="width: 148px;">质地</th>
                                            <th class="center sorting_disabled" style="width: 157px;">年代</th>
                                            <th class="center sorting_disabled" style="width: 150px;">形式</th>
                                            <th class="center sorting_disabled" style="width: 62px;">操作</th>
                                        </tr>
                                        </thead>
                                        <tbody role="alert" aria-live="polite" aria-relevant="all">
                                        <#if resMap.worksList !=null  && (resMap.worksList?size >0)>
                                        <#list resMap.worksList as works>
                                        <tr <#if works_index % 2 == 0> class="odd"<#else>class="even"</#if>>
                                            <td class=" ">
                                                <a class="back_grouped_elements" rel="backImgGroup" href="${e.res(works.image_url)}">${works.works_name}</a>
                                            </td>
                                            <td class=" ">${works.works_type_name}</td>
                                            <td class=" ">${works.works_material_name}</td>
                                            <td class=" ">${works.works_years_name}</td>
                                            <td class=" ">${works.works_form_name}</td>
                                            <td class="left">
                                                <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
                                                    <a class="green" onclick="editWorks('${works.works_id}')" title="编辑">
                                                        <i class="icon-pencil bigger-130"></i>
                                                    </a>
                                                    <a class="red" onclick="delWorks('${works.works_id}')" title="删除">
                                                        <i class="icon-trash bigger-130"></i>
                                                    </a>
                                                    <#if works.banner_flag = '2'>
                                                    <a class="gray" onclick="delWorksBanner('${works.works_id}')" title="取消banner">
                                                        <i class="icon-picture bigger-130"></i>
                                                    </a>
                                                    <#elseif works.banner_flag = '1'>
                                                    <a class="orange" onclick="setWorksBanner('${works.works_id}')"; title="设为banner">
                                                        <i class="icon-picture bigger-130"></i>
                                                    </a>
                                                    </#if>
                                                </div>
                                            </td>
                                        </tr>
                                        </#list>
                                        </#if>
                                        </tbody>
                                    </table>
                                    </@pagination>
                                </div>
                            </div>

                            <div class="space-4"></div>

                            <div class="clearfix form-actions">
                                <div style="float:right;">
                                    <a href="/works/add" class="btn btn-info" type="button">
                                        <i class="icon-ok bigger-110"></i>
                                        新增作品
                                    </a>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!--页面主题内容结束-->
    </div>
</div>
</body>
</html>